package com.kestrel.space.core.service;

import com.kestrel.space.common.model.User;
import com.kestrel.space.common.utils.Result;
import com.kestrel.space.core.model.MyFile;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.InputStream;
import java.util.List;

/**
 * @author yebolin
 * @date 2024/8/26
 */
public interface CosService {
    String upload(MultipartFile file, String type, User user);

    String uploadByInputStream(InputStream in, String fileName, String type, User user);

    void download(String fileUrl, HttpServletRequest request, HttpServletResponse response);

    String delete(String fileUrl);

    List<MyFile> synchronization(String fileUrl, User user);
}
